package org.example.config.sequence.configs.definition;

import org.example.config.sequence.configs.beans.MyDeferredImportSelectorBean;
import org.example.config.sequence.inspect.Inspector;
import org.springframework.context.annotation.DeferredImportSelector;
import org.springframework.context.annotation.Import;
import org.springframework.core.type.AnnotationMetadata;

/**
 * 通过{@link Import @Import}方式加载
 */
public class MyDeferredImportSelector implements DeferredImportSelector {
    @Override
    public String[] selectImports(AnnotationMetadata annotationMetadata) {
        Inspector.log(MyDeferredImportSelector.class, "selectImports");
        return new String[]{
                MyDeferredImportSelectorBean.class.getName()
//                MyBeanFactoryPostProcessor.class.getName(),
//                MyBeanDefinitionRegistryPostProcessor.class.getName(),
//                MyBeanPostProcessor.class.getName()
        };
    }
}
